<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Driver (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Driver (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Driver (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Target-Macros.html#Target-Macros" rel="up" title="Target Macros">
<link href="Run_002dtime-Target.html#Run_002dtime-Target" rel="next" title="Run-time Target">
<link href="Target-Structure.html#Target-Structure" rel="prev" title="Target Structure">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Driver"></a>
<div class="header">
<p>
Next: <a href="Run_002dtime-Target.html#Run_002dtime-Target" accesskey="n" rel="next">Run-time Target</a>, Previous: <a href="Target-Structure.html#Target-Structure" accesskey="p" rel="prev">Target Structure</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Controlling-the-Compilation-Driver_002c-gcc"></a>
<h3 class="section">18.2 Controlling the Compilation Driver, <samp>gcc</samp></h3>
<a name="index-driver"></a>
<a name="index-controlling-the-compilation-driver"></a>

<p>You can control the compilation driver.
</p>
<dl>
<dt><a name="index-DRIVER_005fSELF_005fSPECS"></a>Macro: <strong>DRIVER_SELF_SPECS</strong></dt>
<dd><p>A list of specs for the driver itself.  It should be a suitable
initializer for an array of strings, with no surrounding braces.
</p>
<p>The driver applies these specs to its own command line between loading
default <samp>specs</samp> files (but not command-line specified ones) and
choosing the multilib directory or running any subcommands.  It
applies them in the order given, so each spec can depend on the
options added by earlier ones.  It is also possible to remove options
using &lsquo;<samp>%&lt;<var>option</var></samp>&rsquo; in the usual way.
</p>
<p>This macro can be useful when a port has several interdependent target
options.  It provides a way of standardizing the command line so
that the other specs are easier to write.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-OPTION_005fDEFAULT_005fSPECS"></a>Macro: <strong>OPTION_DEFAULT_SPECS</strong></dt>
<dd><p>A list of specs used to support configure-time default options (i.e.
<samp>--with</samp> options) in the driver.  It should be a suitable initializer
for an array of structures, each containing two strings, without the
outermost pair of surrounding braces.
</p>
<p>The first item in the pair is the name of the default.  This must match
the code in <samp>config.gcc</samp> for the target.  The second item is a spec
to apply if a default with this name was specified.  The string
&lsquo;<samp>%(VALUE)</samp>&rsquo; in the spec will be replaced by the value of the default
everywhere it occurs.
</p>
<p>The driver will apply these specs to its own command line between loading
default <samp>specs</samp> files and processing <code>DRIVER_SELF_SPECS</code>, using
the same mechanism as <code>DRIVER_SELF_SPECS</code>.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-CPP_005fSPEC"></a>Macro: <strong>CPP_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to CPP.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the CPP.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-CPLUSPLUS_005fCPP_005fSPEC"></a>Macro: <strong>CPLUSPLUS_CPP_SPEC</strong></dt>
<dd><p>This macro is just like <code>CPP_SPEC</code>, but is used for C++, rather
than C.  If you do not define this macro, then the value of
<code>CPP_SPEC</code> (if any) will be used instead.
</p></dd></dl>

<dl>
<dt><a name="index-CC1_005fSPEC"></a>Macro: <strong>CC1_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to <code>cc1</code>, <code>cc1plus</code>, <code>f771</code>, and the other language
front ends.
It can also specify how to translate options you give to GCC into options
for GCC to pass to front ends.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-CC1PLUS_005fSPEC"></a>Macro: <strong>CC1PLUS_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to <code>cc1plus</code>.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the <code>cc1plus</code>.
</p>
<p>Do not define this macro if it does not need to do anything.
Note that everything defined in CC1_SPEC is already passed to
<code>cc1plus</code> so there is no need to duplicate the contents of
CC1_SPEC in CC1PLUS_SPEC.
</p></dd></dl>

<dl>
<dt><a name="index-ASM_005fSPEC"></a>Macro: <strong>ASM_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to the assembler.  It can also specify how to translate options
you give to GCC into options for GCC to pass to the assembler.
See the file <samp>sun3.h</samp> for an example of this.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-ASM_005fFINAL_005fSPEC"></a>Macro: <strong>ASM_FINAL_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program how to
run any programs which cleanup after the normal assembler.
Normally, this is not needed.  See the file <samp>mips.h</samp> for
an example of this.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-AS_005fNEEDS_005fDASH_005fFOR_005fPIPED_005fINPUT"></a>Macro: <strong>AS_NEEDS_DASH_FOR_PIPED_INPUT</strong></dt>
<dd><p>Define this macro, with no value, if the driver should give the assembler
an argument consisting of a single dash, <samp>-</samp>, to instruct it to
read from its standard input (which will be a pipe connected to the
output of the compiler proper).  This argument is given after any
<samp>-o</samp> option specifying the name of the output file.
</p>
<p>If you do not define this macro, the assembler is assumed to read its
standard input if given no non-option arguments.  If your assembler
cannot read standard input at all, use a &lsquo;<samp>%{pipe:%e}</samp>&rsquo; construct;
see <samp>mips.h</samp> for instance.
</p></dd></dl>

<dl>
<dt><a name="index-LINK_005fSPEC"></a>Macro: <strong>LINK_SPEC</strong></dt>
<dd><p>A C string constant that tells the GCC driver program options to
pass to the linker.  It can also specify how to translate options you
give to GCC into options for GCC to pass to the linker.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-LIB_005fSPEC"></a>Macro: <strong>LIB_SPEC</strong></dt>
<dd><p>Another C string constant used much like <code>LINK_SPEC</code>.  The difference
between the two is that <code>LIB_SPEC</code> is used at the end of the
command given to the linker.
</p>
<p>If this macro is not defined, a default is provided that
loads the standard C library from the usual place.  See <samp>gcc.cc</samp>.
</p></dd></dl>

<dl>
<dt><a name="index-LIBGCC_005fSPEC"></a>Macro: <strong>LIBGCC_SPEC</strong></dt>
<dd><p>Another C string constant that tells the GCC driver program
how and when to place a reference to <samp>libgcc.a</samp> into the
linker command line.  This constant is placed both before and after
the value of <code>LIB_SPEC</code>.
</p>
<p>If this macro is not defined, the GCC driver provides a default that
passes the string <samp>-lgcc</samp> to the linker.
</p></dd></dl>

<dl>
<dt><a name="index-REAL_005fLIBGCC_005fSPEC"></a>Macro: <strong>REAL_LIBGCC_SPEC</strong></dt>
<dd><p>By default, if <code>ENABLE_SHARED_LIBGCC</code> is defined, the
<code>LIBGCC_SPEC</code> is not directly used by the driver program but is
instead modified to refer to different versions of <samp>libgcc.a</samp>
depending on the values of the command line flags <samp>-static</samp>,
<samp>-shared</samp>, <samp>-static-libgcc</samp>, and <samp>-shared-libgcc</samp>.  On
targets where these modifications are inappropriate, define
<code>REAL_LIBGCC_SPEC</code> instead.  <code>REAL_LIBGCC_SPEC</code> tells the
driver how to place a reference to <samp>libgcc</samp> on the link command
line, but, unlike <code>LIBGCC_SPEC</code>, it is used unmodified.
</p></dd></dl>

<dl>
<dt><a name="index-USE_005fLD_005fAS_005fNEEDED"></a>Macro: <strong>USE_LD_AS_NEEDED</strong></dt>
<dd><p>A macro that controls the modifications to <code>LIBGCC_SPEC</code>
mentioned in <code>REAL_LIBGCC_SPEC</code>.  If nonzero, a spec will be
generated that uses <samp>--as-needed</samp> or equivalent options and the
shared <samp>libgcc</samp> in place of the
static exception handler library, when linking without any of
<code>-static</code>, <code>-static-libgcc</code>, or <code>-shared-libgcc</code>.
</p></dd></dl>

<dl>
<dt><a name="index-LINK_005fEH_005fSPEC"></a>Macro: <strong>LINK_EH_SPEC</strong></dt>
<dd><p>If defined, this C string constant is added to <code>LINK_SPEC</code>.
When <code>USE_LD_AS_NEEDED</code> is zero or undefined, it also affects
the modifications to <code>LIBGCC_SPEC</code> mentioned in
<code>REAL_LIBGCC_SPEC</code>.
</p></dd></dl>

<dl>
<dt><a name="index-STARTFILE_005fSPEC"></a>Macro: <strong>STARTFILE_SPEC</strong></dt>
<dd><p>Another C string constant used much like <code>LINK_SPEC</code>.  The
difference between the two is that <code>STARTFILE_SPEC</code> is used at
the very beginning of the command given to the linker.
</p>
<p>If this macro is not defined, a default is provided that loads the
standard C startup file from the usual place.  See <samp>gcc.cc</samp>.
</p></dd></dl>

<dl>
<dt><a name="index-ENDFILE_005fSPEC"></a>Macro: <strong>ENDFILE_SPEC</strong></dt>
<dd><p>Another C string constant used much like <code>LINK_SPEC</code>.  The
difference between the two is that <code>ENDFILE_SPEC</code> is used at
the very end of the command given to the linker.
</p>
<p>Do not define this macro if it does not need to do anything.
</p></dd></dl>

<dl>
<dt><a name="index-THREAD_005fMODEL_005fSPEC"></a>Macro: <strong>THREAD_MODEL_SPEC</strong></dt>
<dd><p>GCC <code>-v</code> will print the thread model GCC was configured to use.
However, this doesn&rsquo;t work on platforms that are multilibbed on thread
models, such as AIX 4.3.  On such platforms, define
<code>THREAD_MODEL_SPEC</code> such that it evaluates to a string without
blanks that names one of the recognized thread models.  <code>%*</code>, the
default value of this macro, will expand to the value of
<code>thread_file</code> set in <samp>config.gcc</samp>.
</p></dd></dl>

<dl>
<dt><a name="index-SYSROOT_005fSUFFIX_005fSPEC"></a>Macro: <strong>SYSROOT_SUFFIX_SPEC</strong></dt>
<dd><p>Define this macro to add a suffix to the target sysroot when GCC is
configured with a sysroot.  This will cause GCC to search for usr/lib,
et al, within sysroot+suffix.
</p></dd></dl>

<dl>
<dt><a name="index-SYSROOT_005fHEADERS_005fSUFFIX_005fSPEC"></a>Macro: <strong>SYSROOT_HEADERS_SUFFIX_SPEC</strong></dt>
<dd><p>Define this macro to add a headers_suffix to the target sysroot when
GCC is configured with a sysroot.  This will cause GCC to pass the
updated sysroot+headers_suffix to CPP, causing it to search for
usr/include, et al, within sysroot+headers_suffix.
</p></dd></dl>

<dl>
<dt><a name="index-EXTRA_005fSPECS"></a>Macro: <strong>EXTRA_SPECS</strong></dt>
<dd><p>Define this macro to provide additional specifications to put in the
<samp>specs</samp> file that can be used in various specifications like
<code>CC1_SPEC</code>.
</p>
<p>The definition should be an initializer for an array of structures,
containing a string constant, that defines the specification name, and a
string constant that provides the specification.
</p>
<p>Do not define this macro if it does not need to do anything.
</p>
<p><code>EXTRA_SPECS</code> is useful when an architecture contains several
related targets, which have various <code>&hellip;_SPECS</code> which are similar
to each other, and the maintainer would like one central place to keep
these definitions.
</p>
<p>For example, the PowerPC System V.4 targets use <code>EXTRA_SPECS</code> to
define either <code>_CALL_SYSV</code> when the System V calling sequence is
used or <code>_CALL_AIX</code> when the older AIX-based calling sequence is
used.
</p>
<p>The <samp>config/rs6000/rs6000.h</samp> target file defines:
</p>
<div class="smallexample">
<pre class="smallexample">#define EXTRA_SPECS \
  { &quot;cpp_sysv_default&quot;, CPP_SYSV_DEFAULT },

#define CPP_SYS_DEFAULT &quot;&quot;
</pre></div>

<p>The <samp>config/rs6000/sysv.h</samp> target file defines:
</p><div class="smallexample">
<pre class="smallexample">#undef CPP_SPEC
#define CPP_SPEC \
&quot;%{posix: -D_POSIX_SOURCE } \
%{mcall-sysv: -D_CALL_SYSV } \
%{!mcall-sysv: %(cpp_sysv_default) } \
%{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}&quot;

#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT &quot;-D_CALL_SYSV&quot;
</pre></div>

<p>while the <samp>config/rs6000/eabiaix.h</samp> target file defines
<code>CPP_SYSV_DEFAULT</code> as:
</p>
<div class="smallexample">
<pre class="smallexample">#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT &quot;-D_CALL_AIX&quot;
</pre></div>
</dd></dl>

<dl>
<dt><a name="index-LINK_005fLIBGCC_005fSPECIAL_005f1"></a>Macro: <strong>LINK_LIBGCC_SPECIAL_1</strong></dt>
<dd><p>Define this macro if the driver program should find the library
<samp>libgcc.a</samp>.  If you do not define this macro, the driver program will pass
the argument <samp>-lgcc</samp> to tell the linker to do the search.
</p></dd></dl>

<dl>
<dt><a name="index-LINK_005fGCC_005fC_005fSEQUENCE_005fSPEC"></a>Macro: <strong>LINK_GCC_C_SEQUENCE_SPEC</strong></dt>
<dd><p>The sequence in which libgcc and libc are specified to the linker.
By default this is <code>%G %L %G</code>.
</p></dd></dl>

<dl>
<dt><a name="index-POST_005fLINK_005fSPEC"></a>Macro: <strong>POST_LINK_SPEC</strong></dt>
<dd><p>Define this macro to add additional steps to be executed after linker.
The default value of this macro is empty string.
</p></dd></dl>

<dl>
<dt><a name="index-LINK_005fCOMMAND_005fSPEC"></a>Macro: <strong>LINK_COMMAND_SPEC</strong></dt>
<dd><p>A C string constant giving the complete command line need to execute the
linker.  When you do this, you will need to update your port each time a
change is made to the link command line within <samp>gcc.cc</samp>.  Therefore,
define this macro only if you need to completely redefine the command
line for invoking the linker and there is no other way to accomplish
the effect you need.  Overriding this macro may be avoidable by overriding
<code>LINK_GCC_C_SEQUENCE_SPEC</code> instead.
</p></dd></dl>

<dl>
<dt><a name="index-TARGET_005fALWAYS_005fSTRIP_005fDOTDOT"></a>Common Target Hook: <em>bool</em> <strong>TARGET_ALWAYS_STRIP_DOTDOT</strong></dt>
<dd><p>True if <samp>..</samp> components should always be removed from directory names
computed relative to GCC&rsquo;s internal directories, false (default) if such
components should be preserved and directory names containing them passed
to other tools such as the linker.
</p></dd></dl>

<dl>
<dt><a name="index-MULTILIB_005fDEFAULTS"></a>Macro: <strong>MULTILIB_DEFAULTS</strong></dt>
<dd><p>Define this macro as a C expression for the initializer of an array of
string to tell the driver program which options are defaults for this
target and thus do not need to be handled specially when using
<code>MULTILIB_OPTIONS</code>.
</p>
<p>Do not define this macro if <code>MULTILIB_OPTIONS</code> is not defined in
the target makefile fragment or if none of the options listed in
<code>MULTILIB_OPTIONS</code> are set by default.
See <a href="Target-Fragment.html#Target-Fragment">Target Fragment</a>.
</p></dd></dl>

<dl>
<dt><a name="index-RELATIVE_005fPREFIX_005fNOT_005fLINKDIR"></a>Macro: <strong>RELATIVE_PREFIX_NOT_LINKDIR</strong></dt>
<dd><p>Define this macro to tell <code>gcc</code> that it should only translate
a <samp>-B</samp> prefix into a <samp>-L</samp> linker option if the prefix
indicates an absolute file name.
</p></dd></dl>

<dl>
<dt><a name="index-MD_005fEXEC_005fPREFIX"></a>Macro: <strong>MD_EXEC_PREFIX</strong></dt>
<dd><p>If defined, this macro is an additional prefix to try after
<code>STANDARD_EXEC_PREFIX</code>.  <code>MD_EXEC_PREFIX</code> is not searched
when the compiler is built as a cross
compiler.  If you define <code>MD_EXEC_PREFIX</code>, then be sure to add it
to the list of directories used to find the assembler in <samp>configure.ac</samp>.
</p></dd></dl>

<dl>
<dt><a name="index-STANDARD_005fSTARTFILE_005fPREFIX"></a>Macro: <strong>STANDARD_STARTFILE_PREFIX</strong></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code>libdir</code> as the default prefix to
try when searching for startup files such as <samp>crt0.o</samp>.
<code>STANDARD_STARTFILE_PREFIX</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl>
<dt><a name="index-STANDARD_005fSTARTFILE_005fPREFIX_005f1"></a>Macro: <strong>STANDARD_STARTFILE_PREFIX_1</strong></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code>/lib</code> as a prefix to try after the default prefix
when searching for startup files such as <samp>crt0.o</samp>.
<code>STANDARD_STARTFILE_PREFIX_1</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl>
<dt><a name="index-STANDARD_005fSTARTFILE_005fPREFIX_005f2"></a>Macro: <strong>STANDARD_STARTFILE_PREFIX_2</strong></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <code>/lib</code> as yet another prefix to try after the
default prefix when searching for startup files such as <samp>crt0.o</samp>.
<code>STANDARD_STARTFILE_PREFIX_2</code> is not searched when the compiler
is built as a cross compiler.
</p></dd></dl>

<dl>
<dt><a name="index-MD_005fSTARTFILE_005fPREFIX"></a>Macro: <strong>MD_STARTFILE_PREFIX</strong></dt>
<dd><p>If defined, this macro supplies an additional prefix to try after the
standard prefixes.  <code>MD_EXEC_PREFIX</code> is not searched when the
compiler is built as a cross compiler.
</p></dd></dl>

<dl>
<dt><a name="index-MD_005fSTARTFILE_005fPREFIX_005f1"></a>Macro: <strong>MD_STARTFILE_PREFIX_1</strong></dt>
<dd><p>If defined, this macro supplies yet another prefix to try after the
standard prefixes.  It is not searched when the compiler is built as a
cross compiler.
</p></dd></dl>

<dl>
<dt><a name="index-INIT_005fENVIRONMENT"></a>Macro: <strong>INIT_ENVIRONMENT</strong></dt>
<dd><p>Define this macro as a C string constant if you wish to set environment
variables for programs called by the driver, such as the assembler and
loader.  The driver passes the value of this macro to <code>putenv</code> to
initialize the necessary environment variables.
</p></dd></dl>

<dl>
<dt><a name="index-LOCAL_005fINCLUDE_005fDIR"></a>Macro: <strong>LOCAL_INCLUDE_DIR</strong></dt>
<dd><p>Define this macro as a C string constant if you wish to override the
standard choice of <samp>/usr/local/include</samp> as the default prefix to
try when searching for local header files.  <code>LOCAL_INCLUDE_DIR</code>
comes before <code>NATIVE_SYSTEM_HEADER_DIR</code> (set in
<samp>config.gcc</samp>, normally <samp>/usr/include</samp>) in the search order.
</p>
<p>Cross compilers do not search either <samp>/usr/local/include</samp> or its
replacement.
</p></dd></dl>

<dl>
<dt><a name="index-NATIVE_005fSYSTEM_005fHEADER_005fCOMPONENT"></a>Macro: <strong>NATIVE_SYSTEM_HEADER_COMPONENT</strong></dt>
<dd><p>The &ldquo;component&rdquo; corresponding to <code>NATIVE_SYSTEM_HEADER_DIR</code>.
See <code>INCLUDE_DEFAULTS</code>, below, for the description of components.
If you do not define this macro, no component is used.
</p></dd></dl>

<dl>
<dt><a name="index-INCLUDE_005fDEFAULTS"></a>Macro: <strong>INCLUDE_DEFAULTS</strong></dt>
<dd><p>Define this macro if you wish to override the entire default search path
for include files.  For a native compiler, the default search path
usually consists of <code>GCC_INCLUDE_DIR</code>, <code>LOCAL_INCLUDE_DIR</code>,
<code>GPLUSPLUS_INCLUDE_DIR</code>, and
<code>NATIVE_SYSTEM_HEADER_DIR</code>.  In addition, <code>GPLUSPLUS_INCLUDE_DIR</code>
and <code>GCC_INCLUDE_DIR</code> are defined automatically by <samp>Makefile</samp>,
and specify private search areas for GCC.  The directory
<code>GPLUSPLUS_INCLUDE_DIR</code> is used only for C++ programs.
</p>
<p>The definition should be an initializer for an array of structures.
Each array element should have four elements: the directory name (a
string constant), the component name (also a string constant), a flag
for C++-only directories,
and a flag showing that the includes in the directory don&rsquo;t need to be
wrapped in <code>extern &lsquo;<samp>C</samp>&rsquo;</code> when compiling C++.  Mark the end of
the array with a null element.
</p>
<p>The component name denotes what GNU package the include file is part of,
if any, in all uppercase letters.  For example, it might be &lsquo;<samp>GCC</samp>&rsquo;
or &lsquo;<samp>BINUTILS</samp>&rsquo;.  If the package is part of a vendor-supplied
operating system, code the component name as &lsquo;<samp>0</samp>&rsquo;.
</p>
<p>For example, here is the definition used for VAX/VMS:
</p>
<div class="smallexample">
<pre class="smallexample">#define INCLUDE_DEFAULTS \
{                                       \
  { &quot;GNU_GXX_INCLUDE:&quot;, &quot;G++&quot;, 1, 1},   \
  { &quot;GNU_CC_INCLUDE:&quot;, &quot;GCC&quot;, 0, 0},    \
  { &quot;SYS$SYSROOT:[SYSLIB.]&quot;, 0, 0, 0},  \
  { &quot;.&quot;, 0, 0, 0},                      \
  { 0, 0, 0, 0}                         \
}
</pre></div>
</dd></dl>

<p>Here is the order of prefixes tried for exec files:
</p>
<ol>
<li> Any prefixes specified by the user with <samp>-B</samp>.

</li><li> The environment variable <code>GCC_EXEC_PREFIX</code> or, if <code>GCC_EXEC_PREFIX</code>
is not set and the compiler has not been installed in the configure-time
<var>prefix</var>, the location in which the compiler has actually been installed.

</li><li> The directories specified by the environment variable <code>COMPILER_PATH</code>.

</li><li> The macro <code>STANDARD_EXEC_PREFIX</code>, if the compiler has been installed
in the configured-time <var>prefix</var>.

</li><li> The location <samp>/usr/libexec/gcc/</samp>, but only if this is a native compiler.

</li><li> The location <samp>/usr/lib/gcc/</samp>, but only if this is a native compiler.

</li><li> The macro <code>MD_EXEC_PREFIX</code>, if defined, but only if this is a native
compiler.
</li></ol>

<p>Here is the order of prefixes tried for startfiles:
</p>
<ol>
<li> Any prefixes specified by the user with <samp>-B</samp>.

</li><li> The environment variable <code>GCC_EXEC_PREFIX</code> or its automatically determined
value based on the installed toolchain location.

</li><li> The directories specified by the environment variable <code>LIBRARY_PATH</code>
(or port-specific name; native only, cross compilers do not use this).

</li><li> The macro <code>STANDARD_EXEC_PREFIX</code>, but only if the toolchain is installed
in the configured <var>prefix</var> or this is a native compiler.

</li><li> The location <samp>/usr/lib/gcc/</samp>, but only if this is a native compiler.

</li><li> The macro <code>MD_EXEC_PREFIX</code>, if defined, but only if this is a native
compiler.

</li><li> The macro <code>MD_STARTFILE_PREFIX</code>, if defined, but only if this is a
native compiler, or we have a target system root.

</li><li> The macro <code>MD_STARTFILE_PREFIX_1</code>, if defined, but only if this is a
native compiler, or we have a target system root.

</li><li> The macro <code>STANDARD_STARTFILE_PREFIX</code>, with any sysroot modifications.
If this path is relative it will be prefixed by <code>GCC_EXEC_PREFIX</code> and
the machine suffix or <code>STANDARD_EXEC_PREFIX</code> and the machine suffix.

</li><li> The macro <code>STANDARD_STARTFILE_PREFIX_1</code>, but only if this is a native
compiler, or we have a target system root. The default for this macro is
<samp>/lib/</samp>.

</li><li> The macro <code>STANDARD_STARTFILE_PREFIX_2</code>, but only if this is a native
compiler, or we have a target system root. The default for this macro is
<samp>/usr/lib/</samp>.
</li></ol>

<hr>
<div class="header">
<p>
Next: <a href="Run_002dtime-Target.html#Run_002dtime-Target" accesskey="n" rel="next">Run-time Target</a>, Previous: <a href="Target-Structure.html#Target-Structure" accesskey="p" rel="prev">Target Structure</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
